﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SWDataDB.DAL;

public partial class ZKDepthDetials : System.Web.UI.Page
{
    private string strZKID, strBBID, strBPID, strGPID, strYPID, strXGID;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request["zkid"] != null || Request["bbid"] != null || Request["bpid"] != null || Request["gpid"] != null || Request["ypid"] != null || Request["xgid"] != null)
        {
            strZKID = Request["zkid"];
            strBBID = Request["bbid"];
            strBPID = Request["bpid"];
            strGPID = Request["gpid"];
            strYPID = Request["ypid"];
            strXGID = Request["xgid"];
            if (strZKID != null)
            {
                ///////////////////////////////////////////////////////////////////钻孔信息
                YXDeepthInfo yxdeepobj = new YXDeepthInfo();
                this.ZKGridView.DataSource = yxdeepobj.SelectByZKID(strZKID);
                this.ZKGridView.DataBind();
                ZKDIV.Attributes.Add("style","display:block");
            }
            else if (strBBID != null)
            {
                ///////////////////////////////////////////////////////////////////标本信息
                BBInfo bbdeepobj = new BBInfo();
                this.BBGridView.DataSource = bbdeepobj.SelectByBBID(strBBID);
                this.BBGridView.DataBind();
                BBDIV.Attributes.Add("style", "display:block");
            }
            else if (strBPID != null)
            {

                ///////////////////////////////////////////////////////////////////薄片信息
                BPInfo bpdeepobj = new BPInfo();
                this.BPGridView.DataSource = bpdeepobj.SelectByBPID(Convert.ToInt32(strBPID));
                this.BPGridView.DataBind();
                BPDIV.Attributes.Add("style", "display:block");
            }
            else if (strGPID != null)
            {
                ///////////////////////////////////////////////////////////////////光片信息
                GPInfo gpdeepobj = new GPInfo();
                this.GPGridView.DataSource = gpdeepobj.SelectByGPID(Convert.ToInt32(strGPID));
                this.GPGridView.DataBind();

                GPDIV.Attributes.Add("style", "display:block");
            }
            else if (strYPID != null)
            {

                ///////////////////////////////////////////////////////////////////样品信息
                YPInfo ypdeepobj = new YPInfo();
                this.YPGridView.DataSource = ypdeepobj.SelectByYPID(strYPID);
                this.YPGridView.DataBind();

                YPDIV.Attributes.Add("style", "display:block");
            }
            else if (strXGID != null)
            {
                //strXGID.Trim().Replace(" ", "") 
                ///////////////////////////////////////////////////////////////////相关资料
                XGInfo xgdeepobj = new XGInfo();
                this.XGGridView.DataSource = xgdeepobj.SelectByXGID(strXGID);
                this.XGGridView.DataBind();

                XGDIV.Attributes.Add("style", "display:block");
            }
        }
        else
        {
            Response.Write("<script lanuage=javascript>alert('没有对应钻孔的信息');location='javascript:history.go(-1)'</script> ");
        }
        //bind();
    }
    //protected void bind()
    //{

     

        
       
     
      
     
    //}
   
}
